<?php

class Storefront_Form_Cart_Add extends SF_Form_Abstract
{
    
    public function init()
    {
        //We dont wont the default list definition markup (<dl>)
        $this->setDisableLoadDefaultDecorators(true);
        
        $this->setMethod('post');
        $this->setAction('');
        
        $this->setDecorators(array(
            'FormElements',
            'Form'
        ));
        
        $this->addElement('text', 'qty', array(
            'decorators' => array(
                'ViewHelper' //<dd> and <dt> tags are omitted
            ),
            'style' =>'width: 20px',
            'value' => 1
        ));
        
        $this->addElement('submit', 'buy-item', array(
            'decorators' => array(
                'ViewHelper'
            ),
            'label' => 'Add to cart'
        ));
        
        $this->addElement('hidden', 'productId', array(
            'decorators' => array(
                'ViewHelper'
            ),
        ));
        
        $this->addElement('hidden', 'returnto', array(
            'decorators' => array(
                'ViewHelper'
            ),
        ));
        
        
    }
    
}